//
//  IntervalTimerController.h
//  IntervalTimer

//

#import <Cocoa/Cocoa.h>
#import "IntervalTimer.h"


#define REST_STATE 0
#define WORK_STATE 1

@interface IntervalTimerController : NSObjectController {
	IntervalTimer *intervalTimer;
	IBOutlet NSTextView *countdownDisplay;
	IBOutlet NSButton *startButton;
	IBOutlet NSButton *stopButton;
	IBOutlet NSTextView *currentSetDisplay;
	IBOutlet NSTextField *currentPhaseDisplay;
	
	NSTimer *nsTimer;
	//either REST_STATE or WORK_STATE
	int currentState;
	int currentSet;
	//amount of time remaining in this interval in seconds
	int secondsRemaining;
	NSSpeechSynthesizer *speechSynthesizer;
}
- (IBAction)startRunning:(id)sender;
- (IBAction)stopRunning:(id)sender;

- (void) startOfWorkInterval: (NSTimer *) timer;
- (void) startOfRestInterval: (NSTimer *) timer;

- (void) stopSpeaking;
- (void) speakCurrentPhrase;
- (void) dealloc;
- (int) nextState;
- (int) currentInterval;
- (void) startOfCurrentInterval;
- (int) currentSet;
- (void) setCurrentSet: (int) val;

@end
